package com.cykj.controller;

import com.cykj.dto.ResponseDTO;
import com.cykj.service.IGoodService;
import com.cykj.vo.CyGoodVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Set;

/**
 * @author 王宇
 * @CreateTime: 2025-07-29  15:12
 * @BelongsProject: jd_seckill
 * @BelongsPackage: com.cykj.controller
 * @description 商品管理
 */
@RestController
@RequestMapping("/jd/cli/good")
public class GoodController {
    @Autowired
    private IGoodService goodService;

    @Autowired
    private RedisTemplate<String, Object> redisTemplate;

    @GetMapping("/getGoodList")
    public ResponseDTO getGoodList(){
        return goodService.getGoodList();
    }

    @RequestMapping("/subGoodStock")
    public ResponseDTO subGoodStock(CyGoodVO cyGoodVO){
        return goodService.subGoodStock(cyGoodVO);
    }
}
